let baseUrl = 'http://www.itcbc.com:8080'
$.ajaxPrefilter(function(option){
  //1.统一配置url
  option.url = baseUrl +option.url
  //2.统一配置complete
  option.complete = function(xhr){
    //处理错误信息提示（不管请求成功，还是失败，都能够进入这里）
    let res = xhr.responseJSON
    if(re&&res.status ===1 ){
      layer.msg(res.message)
      if(res.message === '身份认证失败'){
        localStorage.removeItem('token')
        location.href = './login.html'
      }
    }
  }
})
option.headers = {
  Authorization:localStorage.gatItem('token')
}